package tree.thread_tree;
import org.junit.Test;

public class Mytest {
    @Test
    public void testThreadTree(){
        ThreadTree tree = new ThreadTree();
        tNode root = new tNode(0, "头结点");
        tree.setRoot(root);
        {
            tNode node1 = new  tNode(1, "光头强");
            tNode node2 = new  tNode(2, "喜洋洋");
            tNode node3 = new  tNode(3, "美羊羊");
            tNode node4 = new  tNode(4, "花洋洋");
            tNode node5 = new  tNode(5, "慢羊羊");
            root.left = node1;
            root.right = node2;
            node1.left = node3;
            node1.right = node4;
            node2.left = node5;
        }
        tree.bulidThreadTree(root);
        tree.preTravel(root);
    }
}
